package com.kk.decorator;

public class ClientCoffeeBar {
    public static void main(String[] args) {

        //巧克力咖啡
        AbstractDrink americaCoffee = new AmericaCoffee();
        System.out.println("单品调用：americaCoffee " + americaCoffee.getDes() + " " + americaCoffee.cost());

        Chocolate chocolate = new Chocolate(americaCoffee);
        System.out.println("加料：    " + chocolate.getDes());

        System.out.println();

        //意大利咖啡
        AbstractDrink italianCoffee = new ItalianCoffee();
        System.out.println("单品调用：italianCoffee " + italianCoffee.getDes() + " " + italianCoffee.cost());

        Milk milk = new Milk(italianCoffee);
        System.out.println("加料： " + milk.getDes());

        System.out.println("继续加料： " + new Milk(milk).getDes());
    }
}
